From d727326ebad8aadb9454dd50621b8e571f87c59f Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 19 Jul 2007 16:39:59 +0000 Subject: [PATCH] Add error if inputting from a style file without IFIELDs. --- csv_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csv_util.c b/csv_util.c index a5d52ffe7..81b833b76 100644 --- a/csv_util.c +++ b/csv_util.c @@ -1091,6 +1091,10 @@ xcsv_data_read(void) s = buff; s = csv_lineparse(s, xcsv_file.field_delimiter, "", linecount); + if (QUEUE_EMPTY(&xcsv_file.ifield)) { + fatal(MYNAME ": attempt to read, but style '%s' has no IFIELDs in it.\n", xcsv_file.description? xcsv_file.description : "unknown"); + } + /* reset the ifield queue */ elem = QUEUE_FIRST(&xcsv_file.ifield); -- 2.30.2